package com.qmx.launcher.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

import com.qmx.launcher.R;
import com.qmx.launcher.activity.base.BaseActivity;

/**
 * @author ChengXiangtong
 * @create 2018/10/31
 * @Describe 应用中心
 */
public class AppCenterActivity extends BaseActivity implements View.OnClickListener {

    private ImageButton ib_setting, ib_wireless, ib_live;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_app_center);
        ib_setting = (ImageButton) findViewById(R.id.ib_setting);
        ib_setting.setOnClickListener(this);
        ib_wireless = (ImageButton)findViewById(R.id.ib_wireless);
        ib_wireless.setOnClickListener(this);
        ib_live = (ImageButton)findViewById(R.id.ib_live);
        ib_live.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent();
        switch (v.getId()) {
            case R.id.ib_setting:
                intent.setClass(AppCenterActivity.this, SettingActivity.class);
                break;
            case R.id.ib_wireless:
                intent.setClass(AppCenterActivity.this, MiracastActivity.class);
                break;
            case R.id.ib_live:
                intent.setClass(AppCenterActivity.this, LiveActivity.class);
                break;
            default:
                break;
        }
        startActivity(intent);
    }
}
